local public_line = {}

class.sitemBtn = extends(class.button) {
    reload = true,
    new = function (parent,x,y,w,h)
        local panel = class.sitemBtn:builder 
        {
            parent = parent,
            x = x,
            y = y,
            w = w,
            h = h,
        }
        return panel
    end,

    init = function (self)
        class.button.init(self)
        self:set_normal_image([[UI\Console\Human\human-transport-slot.blp]])
        self.icon = self:add_panel('')
        self.used = self:add_panel([[core/bantouming.blp]],0,self.h*0.5,nil,self.h*0.5)
        self.used:add_text('|cff00ff00佩戴中|r',0,0,nil,nil,10,5)
        self.used:hide()
        
        self:set_highlight([[UI\Buttons\HeroLevel\HeroLevel-Border.blp]])
        return self
    end,

    set_data = function(self,skill)
        self.skill = skill
        self.used:hide()
        if skill then
            self.icon:set_normal_image(skill.art)
            if skill.in_use and self.index then
                self.used:show()
            end
        else
            self.icon:set_normal_image('')
        end
    end,
}

